import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '',
      component: () => import('@/views/layout/IndexView.vue'),
      children: [
        {
          path: '',
          name: 'home',
          component: () => import('@/views/home/IndexView.vue')
        },
        {
          path: '/tools',
          name: 'tools',
          component: () => import('@/views/tools/IndexView.vue'),
          children: [
            {
              path: '',
              name: 'tools_main',
              component: () => import('@/views/tools/MainView.vue')
            },
            {
              path: 'mysql_create',
              name: 'mysql_create',
              component: () => import('@/views/tools/mysql_create/IndexView.vue')
            }
          ]
        }
      ]
    }
  ]
})

export default router
